using System;
using System.Runtime.Serialization;
using LibreriaCommon;

namespace LibreriaBusiness
{
	/// <summary>
	/// Clase base para excepciones de negocio.
	/// </summary>
    public class boException : Exception
	{
		public boException() : base()
		{
            ErrorLog.Log(this);
		}

		public boException(Exception ex) : base(ex.Message)
		{
            ErrorLog.Log(ex);
		}

		public boException(string message) : base(message)
		{
            ErrorLog.Log(this);
		}
		
		public boException(string message, Exception inner) : base(message, inner)
		{
            ErrorLog.Log(inner);
		}

        protected boException(SerializationInfo info, StreamingContext context) : base(info, context)
		{
            ErrorLog.Log(this);
		}
	}
}
